package com.agent.vpsserver.modules.admin.service;

import com.agent.vpsserver.common.dto.AdminUserCacheDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.agent.vpsserver.common.dto.AdminAccountTokenDTO;
import com.agent.vpsserver.modules.admin.entity.pojo.AdminUserDO;
import com.agent.vpsserver.modules.admin.request.AdminUserIoginRequest;
import com.agent.vpsserver.modules.admin.response.AdminUserInfoResponse;

/**
 * 用户信息(AdminUser)表服务接口
 *
 * @author guochao
 * @since 2022-11-01 19:08:37
 */
public interface AdminUserService extends IService<AdminUserDO> {
    /**
     * 获取登录用户缓存
     * @param token token
     * @return 登录用户信息
     */
    AdminUserCacheDTO get(String token);
    /**
     * 登录
     * @param request 登录请求
     * @return 登录用户信息
     */
    AdminUserInfoResponse login(AdminUserIoginRequest request);

    /**
     * 退出登录
     * @param request
     */
    void logout(AdminAccountTokenDTO request);
}
